1. Field of the Invention
The present invention relates to an automatic data backup apparatus for a microcomputer, and particularly to an improved automatic data backup apparatus for a microcomputer capable of automatically backing up a user program from a central processing unit(CPU).
2. Description of the Conventional Art
Conventionally, a conventional microcomputer development system(MDS) includes programs such as an assembler performed in a personal computer or a host machine, a linker, and a debugger, an emulator and a user system.
In addition, an emulator includes a process for generally controlling the whole operation of the emulator, an apparatus for storing a user program outputted from the host machine, an apparatus for storing a monitor program for displaying an operation state of a target microcomputer such as the information of registers, various flags, the information of program counter and data stored in RAM when a user program is performed in the target microcomputer in the user system, an apparatus for storing the information of the target microcomputer, and a microcomputer for performing a user program or a monitor program in accordance with a control of the processor.
Referring to FIG. 1, a conventional microcomputer for an emulator which has the same construction as the target microcomputer includes an interface input/output circuit 1 for inputting/outputting commands and data between an emulator EM or a user system US and a data/address bus D/A-BUS, a peripheral apparatus 2 for interfacing the data/address bus D/A-BUS and the command/data, a memory 3 for storing data outputted from the data/address bus D/A-BUS, and a CPU 4 for performing a user program outputted from the data/address bus D/A-BUS and for performing a monitor program in accordance with a control signal CS outputted from the emulator.
Referring to FIG. 2, a conventional microcomputer which does not have the same construction as the target microcomputer includes a peripheral apparatus 2, a memory 3 and a CPU which is the same construction as in FIG. 1, and instead of the interface input/output circuit 1 shown in FIG. 1, it includes a target microcomputer input/output circuit 1--1 for inputting/outputting commands and data between the user system US and the data/address bus D/A-BUS and an emulator input/output circuit 1-2 for inputting/outputting commands and data between the emulator and the data/address bus D/A-BUS.
The operation of the conventional microcomputer having the same construction as the target microcomputer will now be explained.
To begin with, when a user input a predetermined command into the target microcomputer at the user's system in order to input a desired program using a host computer, the user program is stored into an apparatus through the host computer and applies to the CPU through the interface input/output circuit 1 and the data/address bus D/A-BUS in accordance with a control of the CPU 4.
Thereafter, the CPU 4 withdraws data necessary for performing the user program previously stored in the memory 3 and performs the user program by receiving the data outputted from the peripheral apparatus through the data/address bus D/A-BUS.
When the operation of the user program is finished in the CPU 4, the user program is applied to the user system US through the data/address bus D/A-BUS and the interface input/output circuit 1.
Meanwhile, when a user input a predetermined command into the computer in order to see the state of the target microcomputer at the user system while performing the user program in the CPU 4, the CPU 4 outputs data corresponding to the result and the state of the user program which is performed therein by a control signal CS outputted from the processor of the emulator.
The data corresponding to the result and the state of the user program is stored into the emulator EM through the data/address bus D/A-BUS and the interface input/output circuit 1.
Thereafter, the monitor program of the emulator is applied to the CPU 4 through the interface input/output circuit 1 and the data/address bus D/A-BUS in accordance with the control of the processor.
In addition, the CPU 4 receives the data necessary to perform the monitor program at the peripheral apparatus 2 and the memory 3.
Thereafter, when the operation of the monitor program is finished, the data corresponding to the result and state of the user program stored in the emulator EM is applied to the CPU 4 through the interface input/output circuit 1 and the data/address bus D/A-BUS. Here, the CPU 4 performs the user program.
In addition, the data corresponding to the state of the target microcomputer at the user system US is stored into a predetermined apparatus through the interface input/output circuit 1, and the stored data is applied to the host computer under the control of the processor.
Thereafter, a user recognizes the state of the target microcomputer and performs necessary actions corresponding to the state thereof.
In addition, the command and data outputted to the user system by splitting the operation of the interface input/output circuit 1 at the conventional microcomputer which has the same construction as the above-mentioned target microcomputer are also inputted/outputted through the target microcomputer input/output circuit 1--1. The command and data outputted to the emulator EM is also inputted/outputted through the emulator input/output circuit 102.
In addition, the operation of the peripheral apparatus 2, the memory 3 and the CPU 4 is the same as the above-mentioned target microcomputer, so that the detailed description is omitted.
However, the conventional microcomputer having the same construction as the target microcomputer should be equipped with an additional split transmittance apparatus for splitting the signal and for transferring the split signal to the interface input/output apparatus.
In addition, the monitor program should be performed after backing up the data and address corresponding to the user program. In addition, the processor should performs complicated controls whenever the monitor program is performed in the CPU since the user program should be returned back after the monitor program is performed, so that additional apparatus for storing the data and address corresponding to the performing state of the user program in the emulator is needed.